home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / yacas_alg / yacas_morphos / share / yacas / include / lispglobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  1.0 KB  |  54 lines

  1.  
  2. /** \file lispglobals.h
  3.  *  Storage of globals in a associated hash
  4.  *
  5.  */
  6.  
  7. #ifndef __lispglobals_h__
  8. #define __lispglobals_h__
  9.  
  10. #include "yacasbase.h"
  11. #include "lispobject.h"
  12. #include "lisphash.h"
  13.  
  14.  
  15.  
  16. class LispGlobalVariable : public YacasBase
  17. {
  18. public:
  19.     inline LispGlobalVariable(const LispGlobalVariable& aOther);
  20.     LispGlobalVariable(LispPtr& aValue): iValue(aValue) {}
  21.     inline LispGlobalVariable& operator=(const LispGlobalVariable& aOther);
  22.  
  23.     inline void SetEvalBeforeReturn(LispBoolean aEval);
  24.     LispPtr iValue;
  25.     LispBoolean iEvalBeforeReturn;
  26. };
  27.  
  28. class LispGlobal : public LispAssociatedHash<LispGlobalVariable>
  29. {
  30. };
  31.  
  32.  
  33. inline LispGlobalVariable::LispGlobalVariable(const LispGlobalVariable& aOther)
  34. {
  35.     iValue.Set(aOther.iValue.Get());
  36.     iEvalBeforeReturn = LispFalse;
  37. }
  38.  
  39. inline void LispGlobalVariable::SetEvalBeforeReturn(LispBoolean aEval)
  40. {
  41.     iEvalBeforeReturn = aEval;
  42. }
  43.  
  44.  
  45. inline LispGlobalVariable& LispGlobalVariable::operator=(const LispGlobalVariable& aOther)
  46. {
  47.     iValue.Set(aOther.iValue.Get());
  48.     return *this;
  49. }
  50.  
  51.  
  52. #endif
  53.  
  54.